package cn.com.git.example.common.util.object;

import java.util.HashMap;
import java.util.Map;

/**
 * @author zhangzhenfu
 * @Description
 * @date 2020/4/3 16:04
 */
public class HashMapBuilder<K, V> {
    private HashMapBuilder() {
    }

    private Map<K, V> innerMap = new HashMap<>();

    public static <K, V> HashMapBuilder<K, V> builder() {
        return new HashMapBuilder();
    }

    public HashMapBuilder<K, V> put(K key, V value) {
        innerMap.put(key, value);
        return this;
    }

    public Map<K, V> build() {
        return innerMap;
    }
}